
/**
 * 广告
 * anthor liyingqi
 *  834777203@qq.com
 */

import { request } from "@/http/axios"
import type * as Adv from './type';


// 商家广告列表
export function getbusinessAdvDataApi(data: Adv.advRequestData) {
  return request<Adv.OrderResponseData>({
    url: "?s=ApiBusiness/business_ad",
    method: "post",
    data
  })
}


// 商家广告删除
export function apiBusinessadvDel(data: {ids: string | number}) {
  return request({
    url: "?s=ApiBusiness/ad_del",
    method: "post",
    data
  })
}

// 商家广告设置状态
export function adSetst(data: {ids: string,st:number,reason?: string}) {
  return request({
    url: "?s=ApiBusiness/ad_setst",
    method: "post",
    data
  })
}


// 编辑新增广告
export function adEdit(data: Adv.CreateOrUpdateAdvRequestData) {
  return request({
    url: "?s=ApiBusiness/ad_edit",
    method: "post",
    data
  })
}


// 广告排序接口

export function adSort() {
  return request<ApiResponseData<number[]>>({
    url: "?s=ApiBusiness/ad_sort",
    method: "post",
  })
}


// 获取广告详情
export function adInfo(data: {adid?: string,is_cg: number}) {
  return request<ApiResponseData<Adv.infoA>>({
    url: "?s=ApiBusiness/ad_info",
    method: "post",
    data
  })
}













